{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {
    "tags": [
     "remove-cell"
    ]
   },
   "outputs": [],
   "source": [
    "# Reference: https://jupyterbook.org/interactive/hiding.html\n",
    "# Use {hide, remove}-{input, output, cell} tags to hiding content\n",
    "\n",
    "import sys\n",
    "import os\n",
    "if not any(path.endswith('textbook') for path in sys.path):\n",
    "    sys.path.append(os.path.abspath('../../..'))\n",
    "from textbook_utils import *"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Donkey Study Question and Scope "
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Our motivating question is: how can a vet accurately estimate the weight of a\n",
    "donkey when they're out in the countryside without a scale? Let's think about the\n",
    "information that is more readily available to them. They can carry a tape\n",
    "measure and find the size of the donkey in other dimensions, like its height.\n",
    "They can observe the animal's sex, assess its general condition, and inquire\n",
    "about the donkey's age. So we can refine our question to: how can a vet\n",
    "accurately predict the weight of a donkey from easy-to-get measurements?      \n",
    "\n",
    "To address this more precise question, [The Donkey\n",
    "Sanctuary](https://www.thedonkeysanctuary.org.uk/) carried out a study at 17\n",
    "mobile deworming sites in rural Kenya.\n",
    "\n",
    "In terms of scope ({numref}`Chapter %s <ch:data_scope>`), the target population\n",
    "is the donkey population in rural Kenya. The access frame is the set of all\n",
    "donkeys that were brought into the de-worming sites. The sample consists of all\n",
    "donkeys brought to these sites between July 23 and August 11, 2010, with a few\n",
    "caveats: if there were too many donkeys to measure at a site, the scientists\n",
    "selected a subset of donkeys to measure; and, any pregnant or visibly diseased\n",
    "donkeys were excluded from the study.\n",
    "\n",
    "To avoid accidentally weighing a donkey twice, each donkey was marked after\n",
    "weighing. To quantify the measurement error and assess repeatability of the\n",
    "weighing process, 31 donkeys were measured twice, without the staff knowing\n",
    "that a donkey was being reweighed.\n",
    "\n",
    "With this sampling process in mind, potential sources of bias for this data\n",
    "include: \n",
    "\n",
    "Coverage bias\n",
    ": The 17 sites were located in the regions surrounding the Yatta district in eastern Kenya and the Naivasha district in the Rift Valley. \n",
    "\n",
    "Selection bias\n",
    ": Only donkeys brought to the sanctuary were enrolled in the study, and when there were too many donkeys at a site, a nonrandom sample was selected.\n",
    "\n",
    "Measurement bias\n",
    ": In addition to measurement error, the scale might have a bias. Ideally, the scale(s) would be calibrated before and after use at a site ({numref}`Chapter %s <ch:pa>`). \n",
    "\n",
    "Despite these potential sources of bias, the access frame seems reasonable for\n",
    "accessing donkeys from rural areas in Kenya that have owners looking after the\n",
    "health of their animals. \n",
    "\n",
    "Our next step is to clean the data. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "celltoolbar": "Tags",
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
